<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h3>网页模板技术学习</h3>
    <p th:text="${message}"></p><!--渲染为<p>message键对应的值</p>-->

    <a th:href="${a1}">搜狗</a><!--渲染为<a href="键为a1的值">-->
    <a th:href="${a2}">百度</a>

    <p th:if="${isLogin}">已经登陆了</p>

    <ul>
        <!--names为String数组[]或list<String>-->
        <li th:each="name : ${names}">
            <span th:text="${name}"></span>
        </li>
    </ul>

    <ul>
        <li th:each="u : ${users}">
            名称:<span th:text="${u.name}"></span>
            年龄:<span th:text="${u.age}"></span>
        </li>
    </ul>
</body>
</html>